package test.rpcobj;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import framework.web.rpc.JsonRpcObject;
import framework.web.rpc.adapter.extjs.IJsonResultSet;

public class MyTestRpc extends JsonRpcObject {
	private static final long	serialVersionUID	= 7406141312758571678L;

	public String hello(String a, int b) {
		//		IJsonResultSet jrs = new IJsonResultSet(){
		//			@Override
		//			public List<Map<String, Object>> getRoot() {
		//				return null;
		//			}
		//			@Override
		//			public int getTotalProperty() {
		//				return 0;
		//			}
		//		};
		return a + b + ">>>>哈哈，这个鬼世界";
	}

	public IJsonResultSet form(final String a, final int b) {
		IJsonResultSet jrs = new IJsonResultSet() {
			@Override
			public List<Map<String, Object>> getRoot() {
				List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
				Map<String, Object> m = new HashMap<String, Object>();
				m.put("RRR", a + "--->" + b);
				list.add(m);
				return list;
			}

			@Override
			public int getTotalProperty() {
				return 0;
			}
		};
		
		return jrs;
	}
}